/*
 * @Author: cx
 * @Date: 2020-09-04 11:45:31 
 * @Last Modified by: cx
 * @Last Modified time: 2020-09-04 11:51:12
 */


/**
 * 获取url 参数
 */
function getQueryString (name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    if ( r != null ){
      return decodeURI(r[2]);
    }else{
      return null;
    }
  };
  
  function jumpUrl(url, params) {
    // 当前url、search参数
    var search = location.search || '?a=1';
    var paramStr = '';
    for(var item in params) {
      paramStr += '&' + item + '=' + params[item];
    }
    url = url + search + paramStr;
    location.href = url;
  
  }